// 自动生成模板LsGoods
package goods

import (
	"time"

	"github.com/flipped-aurora/gin-vue-admin/server/global"
)

type ManyPrice struct {
	Price       *float64 `json:"price" form:"price" gorm:"comment:价格;column:price;"`                      //价格
	MarketPrice *float64 `json:"marketPrice" form:"marketPrice" gorm:"comment:划线价;column:market_price;"` //划线价
	CostPrice   *float64 `json:"costPrice" form:"costPrice" gorm:"comment:成本价;column:cost_price;"`
	Stock       *int64   `json:"stock" form:"stock" gorm:"comment:库存;column:stock;"`    //库存
	Weight      *float64 `json:"weight" form:"weight" gorm:"comment:重量;column:weight;"` //重量
	Volume      *float64 `json:"volume" form:"volume" gorm:"comment:体积;column:volume;"` //体积
	BarCode     *string  `json:"barCode" form:"barCode" gorm:"comment:条码;column:bar_code;size:64;"`
}

// lsGoods表 结构体  LsGoods
type LsGoods struct {
	global.GVA_MODEL
	GoodType         *string     `json:"goodType" form:"goodType" gorm:"comment:商品类型(字典);column:good_type;size:10;" binding:"required"`                          //商品类型
	GoodCode         *string     `json:"goodCode" form:"goodCode" gorm:"comment:商品编码;column:good_code;size:20;" binding:"required"`                                //商品编码
	GoodName         *string     `json:"goodName" form:"goodName" gorm:"comment:商品名称;column:good_name;size:100;" binding:"required"`                               //商品名称
	IsVideo          *string     `json:"isVideo" form:"isVideo" gorm:"default:关;comment:是否添加视频(字典);column:is_video;size:10;" binding:"required"`              //是否添加视频
	BrandId          *int64      `json:"brandId" form:"brandId" gorm:"comment:品牌ID;column:brand_id;" binding:"required"`                                             //品牌ID
	GoodUnit         *string     `json:"goodUnit" form:"goodUnit" gorm:"default:个;comment:商品单位（字典）;column:good_unit;size:11;" binding:"required"`               //商品单位
	SuppilerId       *int64      `json:"suppilerId" form:"suppilerId" gorm:"comment:供应商ID;column:suppiler_id;" binding:"required"`                                  //供应商ID
	IsManySpec       *string     `json:"isManySpec" form:"isManySpec" gorm:"default:关;comment:是否多规格(字典);column:is_many_spec;size:10;" binding:"required"`      //是否多规格
	Price            *float64    `json:"price" form:"price" gorm:"comment:价格;column:price;"`                                                                         //价格
	MarketPrice      *float64    `json:"marketPrice" form:"marketPrice" gorm:"comment:划线价;column:market_price;"`                                                    //划线价
	CostPrice        *float64    `json:"costPrice" form:"costPrice" gorm:"comment:成本价;column:cost_price;"`                                                          //成本价
	Stock            *int64      `json:"stock" form:"stock" gorm:"comment:库存;column:stock;"`                                                                         //库存
	Weight           *float64    `json:"weight" form:"weight" gorm:"comment:重量;column:weight;"`                                                                      //重量
	Volume           *float64    `json:"volume" form:"volume" gorm:"comment:体积;column:volume;"`                                                                      //体积
	BarCode          *string     `json:"barCode" form:"barCode" gorm:"comment:条码;column:bar_code;size:64;"`                                                          //条码
	LogisticsWay     *string     `json:"logisticsWay" form:"logisticsWay" gorm:"default:邮寄;comment:物流方式（字典）;column:logistics_way;size:10;" binding:"required"` //物流方式
	ShipFeeSet       *string     `json:"shipFeeSet" form:"shipFeeSet" gorm:"default:开;comment:运费设置（字典）;column:ship_fee_set;size:10;" binding:"required"`        //运费设置
	ShipFee          *float64    `json:"shipFee" form:"shipFee" gorm:"comment:运费;column:ship_fee;"`                                                                  //运费
	GoodDetail       *string     `json:"goodDetail" form:"goodDetail" gorm:"comment:商品详情;column:good_detail;" binding:"required"`                                  //商品详情
	StockWarn        *int64      `json:"stockWarn" form:"stockWarn" gorm:"comment:库存预警;column:stock_warn;"`                                                        //库存预警
	VirtualSaleNum   *int64      `json:"virtualSaleNum" form:"virtualSaleNum" gorm:"comment:虚拟销量;column:virtual_sale_num;"`                                        //虚拟销量
	VirtualBrowseNum *int64      `json:"virtualBrowseNum" form:"virtualBrowseNum" gorm:"comment:虚拟浏览量;column:virtual_browse_num;"`                                //虚拟浏览量
	LimitWay         *string     `json:"limitWay" form:"limitWay" gorm:"default:关;comment:限购方式;column:limit_way;size:10;" binding:"required"`                     //限购方式
	LimitNum         *int64      `json:"limitNum" form:"limitNum" gorm:"comment:限购数量;column:limit_num;"`                                                           //限购数量
	GoodStatus       *string     `json:"goodStatus" form:"goodStatus" gorm:"default:开;comment:商品上架状态(字典);column:good_status;size:11;" binding:"required"`     //商品上架状态
	GoodSearchType   *string     `json:"goodSearchType" form:"goodSearchType" gorm:"comment:商品筛选状态(字典);column:good_search_type;size:10;"`                      //商品筛选状态
	Sort             *int64      `json:"sort" form:"sort" gorm:"comment:排序;column:sort;"`                                                                            //排序
	VideoUrl         *string     `json:"videoUrl" form:"videoUrl" gorm:"comment:视频链接;column:video_url;size:100;"`                                                  //视频链接
	CreatedBy        *int64      `json:"createdBy" form:"createdBy" gorm:"comment:创建者;column:created_by;"`                                                          //创建者
	UpdatedBy        *int64      `json:"updatedBy" form:"updatedBy" gorm:"comment:更新者;column:updated_by;"`                                                          //更新者
	DeletedBy        *int64      `json:"deletedBy" form:"deletedBy" gorm:"comment:删除者;column:deleted_by;"`                                                          //删除者
	ClassifyId       *int64      `json:"classifyId" form:"classifyId" gorm:"column:classify_id;"`                                                                      //classifyId字段
	ManyPrice        []ManyPrice `json:"ManyPrice" form:"ManyPrice" gorm:"-"`
	Brand            *string     `json:"brand" form:"brand" gorm:"comment:品牌;column:brand;"`
	Suppiler         *string     `json:"suppiler" form:"suppiler" gorm:"comment:供应商;column:suppiler;"`
	Classify         *string     `json:"classify" form:"classify" gorm:"column:classify;"`
}

// TableName lsGoods表 LsGoods自定义表名 ls_goods
func (LsGoods) TableName() string {
	return "ls_goods"
}

type LsBrand struct {
	Id        uint64    `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt time.Time `gorm:"column:created_at;type:datetime(3);default:NULL;" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3);default:NULL;" json:"updated_at"`
	DeletedAt time.Time `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	BrandName string    `gorm:"column:brand_name;type:varchar(20);comment:品牌名称;default:NULL;" json:"brand_name"`   // 品牌名称
	BrandIcon string    `gorm:"column:brand_icon;type:varchar(100);comment:品牌标志;default:NULL;" json:"brand_icon"`  // 品牌标志
	Sort      int16     `gorm:"column:sort;type:smallint;comment:排序;default:NULL;" json:"sort"`                      // 排序
	Enable    string    `gorm:"column:enable;type:varchar(20);comment:开关;default:true;" json:"enable"`               // 开关
	CreatedBy uint64    `gorm:"column:created_by;type:bigint UNSIGNED;comment:创建者;default:NULL;" json:"created_by"` // 创建者
	UpdatedBy uint64    `gorm:"column:updated_by;type:bigint UNSIGNED;comment:更新者;default:NULL;" json:"updated_by"` // 更新者
	DeletedBy uint64    `gorm:"column:deleted_by;type:bigint UNSIGNED;comment:删除者;default:NULL;" json:"deleted_by"` // 删除者
}

func (LsBrand) TableName() string {
	return "ls_brand"
}

type LsSuppliers struct {
	Id             uint64    `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt      time.Time `gorm:"column:created_at;type:datetime(3);default:NULL;" json:"created_at"`
	UpdatedAt      time.Time `gorm:"column:updated_at;type:datetime(3);default:NULL;" json:"updated_at"`
	DeletedAt      time.Time `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	SupplierCode   string    `gorm:"column:supplier_code;type:varchar(20);comment:供应商编码;default:NULL;" json:"supplier_code"`    // 供应商编码
	SupplierName   string    `gorm:"column:supplier_name;type:varchar(20);comment:供应商名称;default:NULL;" json:"supplier_name"`    // 供应商名称
	SupplierTypeId int16     `gorm:"column:supplier_type_id;type:smallint;comment:供应商分类;default:NULL;" json:"supplier_type_id"` // 供应商分类
	LinkPerson     string    `gorm:"column:link_person;type:varchar(20);comment:联系人;default:NULL;" json:"link_person"`            // 联系人
	LinkPhone      string    `gorm:"column:link_phone;type:varchar(191);comment:联系人手机号;default:NULL;" json:"link_phone"`       // 联系人手机号
	LinkTel        string    `gorm:"column:link_tel;type:varchar(191);comment:联系人座机;default:NULL;" json:"link_tel"`             // 联系人座机
	LinkEmail      string    `gorm:"column:link_email;type:varchar(20);comment:邮箱;default:NULL;" json:"link_email"`                // 邮箱
	PronceCode     string    `gorm:"column:pronce_code;type:varchar(20);comment:省编码;default:NULL;" json:"pronce_code"`            // 省编码
	CityCode       string    `gorm:"column:city_code;type:varchar(20);comment:市编码;default:NULL;" json:"city_code"`                // 市编码
	AreaCode       string    `gorm:"column:area_code;type:varchar(20);comment:区编码;default:NULL;" json:"area_code"`                // 区编码
	Address        string    `gorm:"column:address;type:varchar(50);comment:详细地址;default:NULL;" json:"address"`                  // 详细地址
	BankAccount    string    `gorm:"column:bank_account;type:varchar(20);comment:银行账号;default:NULL;" json:"bank_account"`        // 银行账号
	BankSource     string    `gorm:"column:bank_source;type:varchar(30);comment:开户行;default:NULL;" json:"bank_source"`            // 开户行
	CardOwner      string    `gorm:"column:card_owner;type:varchar(10);comment:持卡人姓名;default:NULL;" json:"card_owner"`          // 持卡人姓名
	TaxationNum    string    `gorm:"column:taxation_num;type:varchar(20);comment:税务号;default:NULL;" json:"taxation_num"`          // 税务号
	Sort           int16     `gorm:"column:sort;type:smallint;comment:排序;default:NULL;" json:"sort"`                               // 排序
	CreatedBy      uint64    `gorm:"column:created_by;type:bigint UNSIGNED;comment:创建者;default:NULL;" json:"created_by"`          // 创建者
	UpdatedBy      uint64    `gorm:"column:updated_by;type:bigint UNSIGNED;comment:更新者;default:NULL;" json:"updated_by"`          // 更新者
	DeletedBy      uint64    `gorm:"column:deleted_by;type:bigint UNSIGNED;comment:删除者;default:NULL;" json:"deleted_by"`          // 删除者
}
type LsClassifications struct {
	Id           uint64    `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt    time.Time `gorm:"column:created_at;type:datetime(3);default:NULL;" json:"created_at"`
	UpdatedAt    time.Time `gorm:"column:updated_at;type:datetime(3);default:NULL;" json:"updated_at"`
	DeletedAt    time.Time `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	ClassifyName string    `gorm:"column:classify_name;type:varchar(20);comment:分类名称;primaryKey;not null;" json:"classify_name"` // 分类名称
	ParentId     int16     `gorm:"column:parent_id;type:smallint;comment:父级ID;default:NULL;" json:"parent_id"`                     // 父级ID
	ClassifyIcon string    `gorm:"column:classify_icon;type:varchar(100);comment:分类图标;default:NULL;" json:"classify_icon"`       // 分类图标
	Sort         int16     `gorm:"column:sort;type:smallint;comment:排序;default:NULL;" json:"sort"`                                 // 排序
	Enable       string    `gorm:"column:enable;type:varchar(10);comment:是否显示;default:0;" json:"enable"`                         // 是否显示
	CreatedBy    uint64    `gorm:"column:created_by;type:bigint UNSIGNED;comment:创建者;default:NULL;" json:"created_by"`            // 创建者
	UpdatedBy    uint64    `gorm:"column:updated_by;type:bigint UNSIGNED;comment:更新者;default:NULL;" json:"updated_by"`            // 更新者
	DeletedBy    uint64    `gorm:"column:deleted_by;type:bigint UNSIGNED;comment:删除者;default:NULL;" json:"deleted_by"`            // 删除者
}
type CliLsClassifications struct {
	Id           uint64                 `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt    time.Time              `gorm:"column:created_at;type:datetime(3);default:NULL;" json:"created_at"`
	UpdatedAt    time.Time              `gorm:"column:updated_at;type:datetime(3);default:NULL;" json:"updated_at"`
	DeletedAt    time.Time              `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	ClassifyName string                 `gorm:"column:classify_name;type:varchar(20);comment:分类名称;primaryKey;not null;" json:"classify_name"` // 分类名称
	ParentId     int16                  `gorm:"column:parent_id;type:smallint;comment:父级ID;default:NULL;" json:"parent_id"`                     // 父级ID
	ClassifyIcon string                 `gorm:"column:classify_icon;type:varchar(100);comment:分类图标;default:NULL;" json:"classify_icon"`       // 分类图标
	Sort         int16                  `gorm:"column:sort;type:smallint;comment:排序;default:NULL;" json:"sort"`                                 // 排序
	Enable       string                 `gorm:"column:enable;type:varchar(10);comment:是否显示;default:0;" json:"enable"`                         // 是否显示
	CreatedBy    uint64                 `gorm:"column:created_by;type:bigint UNSIGNED;comment:创建者;default:NULL;" json:"created_by"`            // 创建者
	UpdatedBy    uint64                 `gorm:"column:updated_by;type:bigint UNSIGNED;comment:更新者;default:NULL;" json:"updated_by"`            // 更新者
	DeletedBy    uint64                 `gorm:"column:deleted_by;type:bigint UNSIGNED;comment:删除者;default:NULL;" json:"deleted_by"`            // 删除者
	CliClass     []CliLsClassifications `json:"children" form:"cli_classifications"`
}
